package com.liyuxiang.feign.client;


import com.liyuxiang.feign.entity.Dept;
import com.liyuxiang.feign.vm.ResponseResult;
import feign.Headers;
import org.springframework.cloud.client.loadbalancer.ResponseData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(value = "system", path = "/system")
@Component
public interface DeptClient {
    /**
     * 根据科室名称获取科室详情
     *
     * @return
     */
    @GetMapping("dept/getDeptDetailByDeptName")
    ResponseData getDeptDetailByDeptName(String deptName);

//    @GetMapping("list")
//    List<String> getDeptList();

    @GetMapping("/dept/list")
    ResponseResult<List<Dept>> getDeptList(@RequestHeader String inner);
}
